<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>
  <div class="app">
    {{msg}}
    <p>{{liang}}</p>
    <p>{{age>=18?'成年':'未成年'}}</p>
     <p>{{obj.name}} </p>
     <p>{{arr}} </p>
     <p>{{say}} </p>
     <p>{{hobby}} </p>
     <div v-html="msg1">{{msg}}</div>
     <hr>
     <div v-text="msg2">{{msg}}</div>
  </div>
  <script>
    const app = new Vue({
      el: '.app',
      data: {
        msg: '我是一个帅哥',
        liang: '周亮',
        age: 18,
        obj: {
          name: 'xiang'
        },
        arr: [1, 2, 3],
        say: function () { },
        hobby: '吃翔',
        msg1:'<div>我是一个div标签</div>',
        msg2: '<div>我是一个div标签22222</div>'
      }
      
    })
  </script>
</body>

</html>